package com.cym.comm;

import lombok.Data;

import java.util.List;

@Data
public class Page <T>{
    //当前页码
    private Integer pageNum;
    //每页显示数量
    private Integer pageSize;
    //总记录数
    private Integer totalCount;
    //总页数
    private Integer totalPage;
    //数量
    private List<T> data;

    //总页数
    public void setTotalCount(Integer totalCount){
        this.totalCount = totalCount;
        this.totalPage = totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1;
    }
}
